home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
C-Communications
/
(c)c3.d64
/
micro term.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
8KB
|
286 lines
0 POKE646,5
5 PRINT"[147]":POKE53280,0:POKE53281,0:POKE646,5:PRINTCHR$(14)
10 IFPEEK(49152)<>169THENLOAD"TERM.C1",8,1
15 GOTO12000
20 OPEN5,2,0,CHR$(6):POKE665,75:GET#5,A$:BS=255:GOTO30
25 OPEN5,2,0,CHR$(0)+CHR$(0)+CHR$(59)+CHR$(1):BS=128:GET#5,A$
30 GOSUB 15000
35 DIMD$(500),F$(500)
40 POKE53281,11:PRINT"[147][144] [205]AIN [205]ENU: [194]LOCK [211]IZE ="BS:PRINT
41 PRINT" '[205][201][195][210][207][212][197][210][205].[195]64'"
42 PRINT" [198][207][210][160][212][200][197][160][206][197][215][160][208][213][206][212][197][210]"
43 PRINT" [213][208][204][207][193][196][160][193][206][196][160][196][207][215][206][204][207][193][196]"
44 PRINT
45 PRINT" (C)1984 [210][207][194][197][210][212][160][211]. [211][200][193][215]"
46 PRINT" [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
47 PRINT" [198]IXED [194]Y [196]AVID [194]RADLEY 09/29/84"
48 PRINT" [183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183][183]"
50 PRINT" 1 - [212]RANSMIT A [198]ILE"
60 PRINT" 2 - [210]ECEIVE A [198]ILE"
62 PRINT" 3 - [195]HANGE [194]LOCK [211]IZE"
63 PRINT" 4 - [212]ERMINAL [205]ODE - [198]ULL [196]UPLEX"
64 PRINT" 5 - [195]HAT [205]ODE ----- [200]ALF [196]UPLEX"
65 PRINT" 6 - [204]OCAL [196]IRECTORY"
66 PRINT" 7 - [210]ECEIVE [196]ISK"
67 PRINT" 8 - [211]END [196]ISK"
68 PRINT" 9 - [193]UTO-[196]IAL"
69 PRINT" 0 - [197]XIT":POKE646,5
70 GETA$:IFA$=""THEN70
75 PRINT"[147]":POKE53281,0
80 IFA$="1"THEN1000
90 IFA$="2"THEN2000
92 IFA$="3"THEN3000
93 IFA$="4"THEN4000
94 IFA$="9"THEN6000
95 IFA$="6"THEN7000
96 IFA$="7"THEN9000
97 IFA$="8"THEN8000
98 IFA$="5"THEN10000
99 IFA$="0"THENEND
100 GOTO40
1000 PRINT"[211]END [211]INGLE [198]ILE [205]ODE:":POKE53280,5:OPEN15,8,15
1010 PRINT"[211]END [198]ILE [206]AME => ";:GOSUB5000:IFI$=""THENPOKE53280,0:GOTO4000
1011 PRINT"([208])ROG./([211])EQ. [198]ILE => ";
1012 GETA$:IFA$<>"P"ANDA$<>"S"THEN1012
1013 PRINTA$:O=1
1015 IFA$="S"ORA$="U"THENO=2
1020 CLOSE2:OPEN2,8,0,I$+","+A$+",R":PRINT
1025 GOSUB1100
1030 SYS49173:POKE51227,O:SYS49164:IFPEEK(512)=1THENCLOSE2:POKE53280,0:GOTO4000
1040 SYS49173:POKE51224,BS:SYS49158:CLOSE2:POKE53280,0:CLOSE15:GOTO4000
1100 INPUT#15,E$,E1$,E2$,E3$
1110 IFE$="62"THENPRINT"[198]ILE NOT FOUND":FORDE=1TO1000:GOSUB11000:GOTO1010
1120 RETURN
2000 PRINT"[210]ECEIVE [211]INGLE [198]ILE [205]ODE:":POKE53280,2
2004 PRINT"[210]ECEIVE [198]ILE [206]AME => ";:GOSUB5000:IFI$=""THENPOKE53280,0:GOTO4000
2005 PRINT"([208])ROG./([211])EQ. =>[146] ";
2006 GETA$:IFA$<>"P"ANDA$<>"S"THEN2006
2008 PRINTA$:PRINT
2010 SYS49173:SYS49161:IFPEEK(512)=1THENPOKE53280,0:GOTO4000
2020 T$=","+A$+",W"
2030 OPEN2,8,2,"@0:"+I$+T$:FORX=1TO5200:NEXTX:PRINT:SYS61310
2040 SYS49173:SYS49155:CLOSE2:FORX=1TO1000:NEXTX:POKE668,PEEK(667)
2050 POKE53280,0:GOTO4000
3000 POKE53280,10:PRINT"[194]LOCK [211]IZE? ";:GOSUB5000:IFI$=""THEN40
3010 BS=VAL(I$):IFBS<40THENBS=40
3020 IFBS>255THENBS=255
3030 POKE53280,0:GOTO40
4000 PRINT"[147]":PRINT:PRINTTAB(2)"[212]ERMINAL [205]ODE:":PRINT:PRINT" [157][146]";
4010 SYS49173:SYS49167:POKE53280,0:GOTO40
5000 I$=""
5010 PRINT" [146][157]";
5020 GETA$:IFA$=""THEN5020
5030 IFA$=CHR$(13)THEN5100
5040 IFA$=CHR$(20)THEN5080
5050 IFLEN(A$)>20THEN5020
5060 IF(ASC(A$)AND127)<32THEN5020
5070 PRINTA$;:I$=I$+A$:GOTO5010
5080 IFLEN(I$)=0THEN5020
5090 PRINT" [157][157]";:I$=LEFT$(I$,LEN(I$)-1):GOTO5010
5100 PRINT" ":RETURN
6000 PRINT"[147] [193]UTODIAL":PRINT:PRINT:PRINT" 1. 1650 [205]ODEM":PRINT:PRINT
6001 PRINT" 2. [200]AYES [193]UTODIAL":PRINT:PRINT:PRINT:POKE53280,15
6002 GETA$:IFA$=""THEN40
6003 IFA$<>"1"ANDA$<>"2"THEN6002
6004 IFA$="2"THEN16000
6005 POKE56579,PEEK(56579)OR32:POKE56577,PEEK(56577)AND223:T=TI
6006 IFTI<T+100THEN6006
6007 PRINT"[147]"
6010 INPUT"[197]NTER NUMBER TO DIAL";N$:TI$="000000"
6015 POKE56577,PEEK(56577)OR32:T=TI
6016 IFTI<T+100THEN6016
6020 FORI=1TOLEN(N$):A$=MID$(N$,I,1)
6030 IFVAL(A$)=0ANDA$<>"0"THENNEXT
6040 A=VAL(A$):IFA=0THENA=10
6050 FORJ=1TOA:POKE56577,PEEK(56577)AND223:T=TI
6060 IFTI<T+3THEN6060
6070 POKE56577,PEEK(56577)OR32:T=TI
6080 IFTI<T+2THEN6080
6090 NEXTJ:T=TI
6100 IFTI<T+40THEN6100
6110 NEXTI
6120 NT=NT+1:PRINT"[196]IALING COMPLETE. [206]UMBER OF TRIES:"NT:PRINT"[212]IME:"TI$:TT=TI
6130 IF(TI-TT)>1200THENPOKE56577,PEEK(56577)AND223:PRINT"HANG UP.[145]"
6140 IF(TI-TT)>1500THENPRINT" [145][145][145]":PRINT" [145]":GOTO6015
6150 GETA$:IFA$=""THENPOKE53280,0:GOTO40
6160 IFA$=""THENPOKE56577,PEEK(56577)OR32:GOTO40
6170 IFPEEK(56577)AND16THEN6130
6180 POKE53280,0:GOTO4000
7000 PRINT"[147][204]OCAL [196]IRECTORY"
7100 POKE53280,11
7200 N$=CHR$(0)
7210 PRINT:PRINT:PRINT
7230 OPEN9,8,0,"$0":GET#9,A$,A$
7240 GET#9,A$,A$:IFA$=""THENCLOSE9:GOTO7280
7250 GET#9,A$,B$:PRINTASC(A$+N$)+ASC(B$+N$)*256;
7260 GET#9,A$:PRINTA$;:IFA$<>""THEN7260
7270 PRINT:GOTO7240
7280 PRINT:PRINTSPC(3)"[200]IT ANY KEY FOR [205]AIN [205]ENU"
7285 GETA$:IFA$=""THEN7285
7290 POKE53280,0:GOTO40
7300 IFA$<" "ORA$>CHR$(127)ANDA$<"[160]"THEN7340
7305 GETA$:IFA$=CHR$(13)THENPRINT" ":OPEN9,8,15,I$:GOTO7110
7310 IFA$="[147]"ANDI$<>""THENFORI=1TOLEN(I$)+1:PRINTCHR$(20);:NEXT:GOTO7300
7320 IFA$="[157]"THENA$=CHR$(20)
7330 IFA$=CHR$(20)ANDI$<>""THENI$=LEFT$(I$,LEN(I$)-1):GOTO7360
7340 IFA$<" "ORA$>CHR$(127)ANDA$<"[160]"THEN7305
7350 I$=I$+A$
7360 PRINTA$"[164][157]";:GOTO7305
8000 PRINT"[147][210]EADING DIRECTORY":PRINT:PRINT:PRINT:POKE53280,5
8120 CLOSE9:N$=CHR$(0)
8230 OPEN9,8,0,"$0":GET#9,A$,A$
8240 PRINT" ":YZ=0:GET#9,A$,A$:IFA$=""THENCLOSE9:GOTO8280
8250 GET#9,A$,B$:REM: PRINTASC(A$+N$)+ASC(B$+N$)*256;
8260 GET#9,A$:PRINT"";D$(X)
8261 IFA$=CHR$(34)THENYZ=0:GOTO8260
8262 IFA$=CHR$(32)THENYZ=YZ+1:GOTO8260
8263 IFYZ=1THENA$=" "+A$:YZ=0
8265 D$(X)=D$(X)+A$:IFA$<>""THEN8260
8270 X=X+1:GOTO8240
8280 PRINT"[147]":W=X-2:RESTORE
8290 FORJ=1TOW:L=LEN(D$(J))-3:IFMID$(D$(J),L+1,1)="R"THENNEXTJ
8291 F$(J)=LEFT$(D$(J),L)+","+MID$(D$(J),L+1,1):NEXT
8295 FORN=1TOW:P$=F$(N):PRINT"[147]":POKE53280,11::PRINT"[211]END [196]ISK [205]ODE:"
8296 PRINT"";
8300 FORJ=1TOLEN(P$):H$=MID$(P$,J,1)
8310 PRINTH$;:PRINT#5,H$;:NEXTJ:O=1
8315 IFH$="S"ORH$="U"THENO=2
8320 PRINT:PRINT#5,CHR$(13)
8330 GET#5,A$:IFA$=""THEN8330
8340 OPEN2,8,0,P$:PRINT
8350 SYS49173:POKE51227,O:SYS49164:IFPEEK(512)=1THENCLOSE2:GOTO4000
8360 SYS49173:POKE51224,BS:SYS49158:CLOSE2:POKE53280,7
8365 FORX=1TO2000:NEXTX:NEXTN
8370 PRINT#5,CHR$(4):PRINT#5:PRINT
8380 GOSUB11000:POKE53280,0:GOTO10000
9000 PRINT"[147][200]OST IS PREPARING TO SEND - [215][193][201][212]!!!"
9005 POKE53280,2:PRINT"[210]ECEIVE [196]ISK [205]ODE:":PRINT"";
9010 GET#5,A$:IFA$=""THEN9010
9015 POKE53280,7
9020 IFA$=CHR$(13)THENPRINT:GOTO9060
9030 IFA$=CHR$(4)THENPOKE53280,0:PRINT"[147][197]ND OF TRANSFER![146]":GOTO9100
9040 PRINTA$;:F$=F$+A$:GOTO9010
9060 SYS49173:SYS49161:IFPEEK(512)=1THEN4000
9070 CLOSE2:OPEN2,8,2,"@0:"+F$+",W":FORX=1TO1300:NEXTX:PRINT:SYS61310
9080 SYS49173:SYS49155:CLOSE2:FORX=1TO1000:NEXTX:POKE668,PEEK(667)
9090 FORX=1TO500:NEXTX:PRINT"[147]":F$="":GOTO9005
9100 GOSUB11000:POKE53280,0
10000 PRINT:PRINTTAB(2)"[195]HAT [205]ODE:":PRINT:PRINT" [157][146]";
10005 GET#5,A$:IFA$=""THENPOKE646,7:GOTO10030
10010 PRINTCHR$(F%(ASC(A$)));:POKE212,0
10020 IFA$=CHR$(8)THENPRINTCHR$(20);
10030 GETA$:IFA$=""THENPOKE646,5:GOTO10005
10040 PRINTA$;:POKE212,0:IFA$=CHR$(19)THENPOKE646,5:GOTO40
10050 IFA$=CHR$(20)THENPRINT#5,CHR$(8);:GOTO10030
10060 IFA$="[157]"THENA$=CHR$(20):PRINT" "A$;:PRINT#5,CHR$(8):GOTO10005
10070 IFA$=CHR$(20)THENA$=CHR$(8)
10090 PRINT#5,CHR$(T%(ASC(A$)));:GOTO10005
11000 FORK=1TO3
11001 S=54272
11002 POKE S+1,100
11003 POKE S+5,10
11004 POKES+15,255
11005 POKES+24,15
11006 POKES+4,21
11007 FORT=1TO250:NEXT:POKES+4,20
11008 IFP=1THENRETURN
11009 NEXTK
11010 RETURN
12000 FORX=1TO7:PRINT:NEXTX:PRINT" ";
12001 FORX=1TO6:PRINT"[158] [145][157]";:NEXTX
12002 PRINT" ";" [157] [157] [157] ";"[145][145][145]";" ";
12003 FORX=1TO7:PRINT"[157] ";:NEXTX:PRINT"[146] ";
12004 FORX=1TO3:PRINT"[145] [157]";:NEXTX:PRINT"[146][145][145] [146]";" ";"";
12005 FORX=1TO4:PRINT" ";:NEXT:PRINT"[157][157][157][157]";" [157] [157] ";" [146] ";
12006 PRINT" [145][157] [145][157] [145][157] [145][157] ";" [157] [146]";" ";"[145]";
12007 FORX=1TO4:PRINT" ";:NEXT:PRINT"[157][157][157][157]";" [157] [157] ";" ";" [145][157] [145][157] [145][157] "
12008 FORX=1TO6:PRINT:NEXT:PRINT" ";"[157][157][157][157]";
12009 FORX=1TO7:PRINT" [157]";:NEXTX:PRINT"[159][146] ";"[145] ";"[157][157][157] [157][145] [157][145] [157][157][157]";
12010 PRINT"[145] [145][157] ";"[146] ";
12011 PRINT" [145][157] [145][157] [145][157] [145][157] ";" [157] [146]";" ";"";
12012 FORX=1TO3:PRINT" [145][157]";:NEXTX
12013 PRINT" ";" [157] [157] [157] ";"[145][145][145]";" ";
12014 FORX=1TO4:PRINT"[157] ";:NEXTX:GOSUB17000
12015 PRINT:PRINT:PRINT"[150]1650 - [200]AYES";
12016 PRINT" [155](C) 1984 [210]OBERT [211]HAW"
12017 FORD=1TO25:PRINT" [158][198]IXED [194]Y [196]AVID [194]RADLEY 09/29/84":FORZY=1TO150:NEXTZY
12018 PRINT"[145] ":FORZY=1TO150:NEXTZY:PRINT"[145][145]"
12019 NEXTD:POKE53280,3
12020 PRINT"[147]":PRINT:PRINT:PRINT:PRINTTAB(5)" [195][200][207][207][211][197] [194][193][213][196] [210][193][212][197] "
12030 PRINT:PRINTTAB(5)"1. 300 [194]AUD"
12040 PRINT:PRINTTAB(5)"2. 1200 [194]AUD":POKE646,5:POKE53280,3
12050 GETA$:IFA$=""THEN12050
12055 POKE53280,0
12060 IFA$="1"THENPRINT:PRINT:PRINTTAB(5)"[198]IXING [193][211][195][201][201] [212]RANSLATION":GOTO20
12070 IFA$="2"THENPRINT:PRINT:PRINTTAB(5)"[198]IXING [193][211][195][201][201] [212]RANSLATION":GOTO25
12080 IFA$<>"1"ANDA$<>"2"THEN12050
15000 IFQ=1THENRETURN
15005 DIMF%(255),T%(255)
15010 FORJ=32TO64:T%(J)=J:NEXTJ
15020 T%(13)=13:T%(20)=8
15030 FORJ=65TO90:K=J+32:T%(J)=K:NEXTJ
15040 FORJ=91TO95:T%(J)=J:NEXTJ
15050 FORJ=193TO218:K=J-128:T%(J)=K:NEXTJ
15060 T%(146)=16:T%(133)=16
15070 FORJ=0TO255:K=T%(J)
15080 IFK<>0THENF%(K)=J:F%(K+128)=J
15090 NEXT
15100 RETURN
16000 PRINT"[147][200]OW MANY CALLS SHALL [201] MAKE";:INPUTRT:POKE53280,11
16005 PRINT#5,"ATV0":C=TI+60:Y=1
16010 IFTI<CTHENGET#5,A$:GOTO16010
16030 INPUT"[206]UMBER TO [196]IAL";N$
16050 N1$="ATDT"+N$
16060 PRINT"[147][208]RESS '[211]' TO [193]BORT"
16070 PRINT"[196]IALING..."+N$+" [193]TTEMPT # ";Y:PRINT
16075 IFY>1THENPRINT#5,"A/":C=TI+90:GOTO16081
16080 PRINT#5,N1$:C=TI+90
16081 IFTI<CTHENGET#5,A$:GOTO16081
16090 C=TI+1200:R=TI
16095 GET#5,A$
16100 IFA$="1"ORA$="5"THENGOSUB11000:GOTO4000
16120 GETB$:IFB$="S"THENPRINT#5,"A":C=TI+380:Y=0:GOTO16200
16125 PRINTTAB(30)INT((TI-R)/60);"[145]"
16130 IFTI<CTHEN16095
16140 PRINT"[206]EXT ATTEMPT OF";RT:PRINT#5,"A":C=TI+180
16150 IFTI<CTHENGET#5,A$:GOTO16150
16155 IFY=RTTHENPRINT"[201] HAVE CALLED";RT;"TIMES AND NO ANSWER!":GOTO16190
16160 Y=Y+1:GOTO16060
16190 GOSUB11000:POKE53280,0:GOTO40
16200 IFTI<CTHENGET#5,A$,A$:GOTO16200
16210 POKE53280,0:GOTO40
17000 X=2
17005 PRINT"[146][145] [146]";:POKE646,X:X=X+1:GOSUB17300
17010 PRINT"[145][145][145][145][145]*";:POKE646,X:X=X+1:GOSUB17300
17020 PRINT"[145][157][157]*";:POKE646,X:X=X+1:GOSUB17300
17030 PRINT"[157][157]*";:POKE646,X:X=X+1:GOSUB17300
17040 PRINT"[157][157]*";:POKE646,X:X=X+1:GOSUB17300
17050 PRINT"[157][157]*";:POKE646,X:X=X+1:GOSUB17300
17060 PRINT"[157]*";:POKE646,X:X=X+1:GOSUB17300
17070 PRINT"[157]*";:POKE646,X:X=X+1:GOSUB17300
17080 PRINT"[157]*";:POKE646,X:X=X+1:GOSUB17300
17085 PRINT"[157]*";:POKE646,X:X=X+1:GOSUB17300
17090 PRINT"*";:POKE646,X:X=X+1:GOSUB17300
17100 PRINT"*";:POKE646,X:X=X+1:GOSUB17300
17110 PRINT"*";:POKE646,X:X=X+1:GOSUB17300
17120 PRINT"[145]*";:POKE646,X:X=X+1:GOSUB17300
17130 PRINT"[145][157]*";:POKE646,X:X=X+1:GOSUB17300
17140 PRINT"[145][157] ";:POKE646,X:X=X+1:GOSUB17300
17150 PRINT"[157][157]*";:POKE646,X:X=X+1:GOSUB17300
17155 PRINT"[157][157]*";:POKE646,X:X=X+1:GOSUB17300
17160 PRINT"[157][157]*";:POKE646,X:X=X+1:GOSUB17300
17170 PRINT"[145][145][145][145]*";:POKE646,X:X=X+1:GOSUB17300
17180 PRINT"[157]*";:POKE646,X:X=X+1:GOSUB17300
17190 PRINT"[157]*";:POKE646,X:X=X+1:GOSUB17300
17200 PRINT"[157]*";:POKE646,X:X=X+1:GOSUB17300
17210 PRINT"[157]*";:POKE646,X:X=X+1:GOSUB17300
17220 PRINT"[157]*";:POKE646,X:X=X+1:GOSUB17300
17230 PRINT"[157]*";:POKE646,X:X=X+1:GOSUB17300
17240 PRINT"[157][157][145][145][145][145][145]*";:POKE646,X:X=X+1:GOSUB17300
17250 PRINT"[157][157]*";:POKE646,X:X=X+1:GOSUB17300
17260 PRINT"[157][157]*";:POKE646,X:X=X+1:GOSUB17300
17270 PRINT"[157]*";:POKE646,X:X=X+1:GOSUB17300
17280 PRINT"*";:X=X+2:GOSUB17300
17290 PRINT"*";
17300 P=1:GOSUB11001:P=0:RETURN